﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace FourSquareNETLibrary
{
    public class badge
    {
        private string _id;
        private string _name;
        private Uri _icon;
        private string _description;

        public badge(XmlNode Xml)
        {
             XmlNodeList xnl = Xml.ChildNodes;
             foreach (XmlNode xn in xnl)
             {
                 switch (xn.Name)
                 {
                     case "id":
                         this._id = xn.InnerText;
                         break;
                     case "name":
                         this._name = xn.InnerText;
                         break;
                     case "icon":
                         this._icon = new Uri(xn.InnerText);
                         break;
                     case "description":
                         this._description = xn.InnerText;
                         break;
                 }
             }
        }

        public string Id
        {
            get
            {
                return this._id;
            }
        }

        public string Name
        {
            get
            {
                return this._name;
            }
        }

        public Uri Icon
        {
            get
            {
                return this._icon;
            }
        }

        public string Description
        {
            get
            {
                return this._description;
            }
        }
    }
}
